package MY;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
	public class Lj {
	public static Connection getConnection() throws SQLException,ClassNotFoundException{
		Class.forName("com.mysql.jdbc.Driver");
		  Connection con=DriverManager.getConnection("jdbc:mysql://localhost/zp?Unicode=true&characterEncoding=UTF-8","root","1234");
		  return con;
	}
		public static void closeConnection(Connection conn)throws SQLException {
			if (conn !=null) {
				conn.close();
			
		}
	} 
}
